package com.newly.api.sys.feign;

import com.newly.common.base.constants.ServerUriConstant;
import com.newly.common.base.entity.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @program: newly-parent
 * @remark: 数据库管理接口
 * @author: guan
 * @create: 2021-11-30 18:06
 */
@Api(tags = "字典表接口")
@FeignClient(path = ServerUriConstant.NEWLY_SYS_DATABASE, name = ServerUriConstant.NEWLY_SYS_SERVICE_NAME)
public interface DatabaseClient {

    @ApiModelProperty("查询数据表列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "keyword", value = "关键字", dataType = "string", paramType = "query"),
            @ApiImplicitParam(name = "offset", value = "页码", dataType = "int", paramType = "query"),
            @ApiImplicitParam(name = "limit", value = "页数", dataType = "int", paramType = "query")
    })
    @GetMapping("/listTable")
    R listTable(
            @RequestParam(value = "offset") Integer offset,
            @RequestParam(value = "limit") Integer limit,
            @RequestParam(value = "keyword", required = false) String keyword);
}
